define([],function(){
	var tpl = {};

	tpl.historyList = function(){
		return historyList();
	}
	tpl.info = function(){
		return info();
	}
	tpl.infoPrint = function(){
		return infoPrint();
	}
	tpl.result = function(){
		return result();
	}

	var historyList = function(){
		return 	'<script id="cnbsrHistoryRecord_historyList" type="text/html">'+
				'	{{each list as value}}'+
                '		<li data-id="{{value.id}}"><span class="right"></span>{{value.testTime}}({{value.testAge}})</li>'+
                '	{{/each}}'+
				'</script>';
	}
	var info = function(){
        return  '<script id="cnbsrHistoryRecord_info" type="text/html">'+
                '    <li>姓名宝宝<span>{{userName}}</span></li>'+
                '    <li>宝宝月龄<span>{{actualMonth}}</span></li>'+
                '    <li>出生体重<span>{{if birthWeight}}{{birthWeight}}{{else}}未知{{/if}}</span></li>'+
                '    <li>是否早产<span>{{if prematureDelivery=="Y"}}是{{else if prematureDelivery=="N"}}否{{else}}未知{{/if}}</span></li>'+
                '    <li>实际年龄<span>{{actualAge}}</span></li>'+
                
                '    <li>分娩住院号<span>未知</span></li>'+
                '    <li>门诊号<span>未知</span></li>'+
                '    <li>社保卡号<span>未知</span></li>'+
                '    <li>自管卡号<span>未知</span></li>'+
            	'</script>';
    }
    var infoPrint = function(){
        return  '<script id="cnbsrHistoryRecord_infoPrint" type="text/html">'+
                '   <ul class="clearfix">'+
                '       <li>'+
                '           <div>姓名</div>'+
                '           <div>{{info.userName}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>性别</div>'+
                '           <div>{{if info.gender=="F"}}女{{else if info.gender=="M"}}男{{else}}未知{{/if}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>出生日期</div>'+
                '           <div>{{info.birthday}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>月龄（岁）</div>'+
                '           <div>{{info.agePrint.year}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>月龄（周）</div>'+
                '           <div>{{info.agePrint.week}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>月龄（天）</div>'+
                '           <div>{{info.agePrint.day}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>大运动</div>'+
                '           <div>{{data.sportsScore}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>精细运动</div>'+
                '           <div>{{data.fineActionScore}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>适应能力</div>'+
                '           <div>{{data.adaptabilityScore}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>语言</div>'+
                '           <div>{{data.languageScore}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>社交行为</div>'+
                '           <div>{{data.personalScore}}</div>'+
                '       </li>'+
                '       <li>'+
                '           <div>总发育商</div>'+
                '           <div>{{data.score}}</div>'+
                '       </li>'+
                '   </ul>'+
                '</script>';
    }
    var result = function(){
        return  '<script id="cnbsrHistoryRecord_result" type="text/html">'+
                '    <div class="cnbsrResult-print">'+
                '       <div class="title">检查结果</div>'+
                '       <div class="result">'+
                '           <span>大运动发育滞后(<i>{{if sportsFlag}}√{{/if}}</i>);</span>'+
                '           <span>精细运动发育滞后(<i>{{if fineActionFlag}}√{{/if}}</i>);</span>'+
                '           <span>适应能力发育滞后(<i>{{if adaptabilityFlag}}√{{/if}}</i>);</span>'+
                '           <span>语言发育滞后(<i>{{if languageFlag}}√{{/if}}</i>);</span>'+
                '           <span>社交行为发育滞后(<i>{{if personalFlag}}√{{/if}}</i>);</span>'+
                '       </div>'+
                '       <div class="title">总发育商水平：</div>'+
                '       <div class="result">'+
                '           <span>优秀(<i>{{if score1}}√{{/if}}</i>);</span>'+
                '           <span>良好(<i>{{if score2}}√{{/if}}</i>);</span>'+
                '           <span>中等(<i>{{if score3}}√{{/if}}</i>);</span>'+
                '           <span>偏低(<i>{{if score4}}√{{/if}}</i>);</span>'+
                '           <span>障碍(<i>{{if score5}}√{{/if}}</i>);</span>'+
                '       </div>'+
                '    </div>'+
                '    <div class="cnbsrBottom-print">'+
                '        <span>检查日期：<span>{{testTime}}</span></span><br/>'+
                '        {{if doctorName}}<span>检查医生：<span>{{doctorName}}</span></span>{{/if}}'+
                '    </div>'+
                '</script>';
    }

	return tpl;
});